home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / Online / Miami / MiamiSDK / netinclude / resolv.h < prev    next >
C/C++ Source or Header  |  1997-12-08  |  2KB  |  56 lines

  1. #ifndef _RESOLV_H_
  2. #define    _RESOLV_H_
  3.  
  4. /*
  5.  * Revision information.  This is the release date in YYYYMMDD format.
  6.  * It can change every day so the right thing to do with it is use it
  7.  * in preprocessor commands such as "#if (__RES > 19931104)".  Do not
  8.  * compare for equality; rather, use it to determine whether your resolver
  9.  * is new enough to contain a certain feature.
  10.  */
  11.  
  12. #define    __RES    19960801
  13.  
  14. /*
  15.  * This used to be defined in res_query.c, now it's in herror.c.  It was
  16.  * never extern'd by any *.h file before it was placed here.  herror.c is
  17.  * part of libresolv.a even though it might make more sense in libnetdb.a
  18.  * or even libnet.a.
  19.  */
  20.  
  21. extern int h_errno;
  22.  
  23. /*
  24.  * Global defines and variables for resolver stub.
  25.  */
  26. #define    MAXNS            3    /* max # name servers we'll track */
  27. #define    MAXDFLSRCH        3    /* # default domain levels to try */
  28. #define    MAXDNSRCH        6    /* max # domains in search path */
  29. #define    LOCALDOMAINPARTS    2    /* min levels in name that is "local" */
  30.  
  31. #define    RES_TIMEOUT        5    /* min. seconds between retries */
  32. #define    MAXRESOLVSORT        10    /* number of net to sort on */
  33. #define    RES_MAXNDOTS        15    /* should reflect bit field size */
  34.  
  35. /*
  36.  * Resolver options (keep these in synch with res_debug.c, please)
  37.  */
  38. #define RES_INIT    0x00000001    /* address initialized */
  39. #define RES_DEBUG    0x00000002    /* print debug messages */
  40. #define RES_AAONLY    0x00000004    /* authoritative answers only (!IMPL)*/
  41. #define RES_USEVC    0x00000008    /* use virtual circuit */
  42. #define RES_PRIMARY    0x00000010    /* query primary server only (!IMPL) */
  43. #define RES_IGNTC    0x00000020    /* ignore trucation errors */
  44. #define RES_RECURSE    0x00000040    /* recursion desired */
  45. #define RES_DEFNAMES    0x00000080    /* use default domain name */
  46. #define RES_STAYOPEN    0x00000100    /* Keep TCP socket open */
  47. #define RES_DNSRCH    0x00000200    /* search up local domain tree */
  48. #define    RES_INSECURE1    0x00000400    /* type 1 security disabled */
  49. #define    RES_INSECURE2    0x00000800    /* type 2 security disabled */
  50. #define    RES_NOALIASES    0x00001000    /* shuts off HOSTALIASES feature */
  51. #define    RES_USE_INET6    0x00002000    /* use/map IPv6 in gethostbyname() */
  52.  
  53. #define RES_DEFAULT    (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
  54.  
  55. #endif /* !_RESOLV_H_ */
  56.